﻿@using WSS.Pub
@{
    ViewBag.Title = "邮箱验证";
}
@if (ViewBag.VerityResult == "success")
{
    <div class="container">
        <div class="page-header">
            <h1>邮箱验证成功</h1>
        </div>
        <p class="lead">
            邮箱验证成功，3秒后跳至个人信息页面
        </p>
    </div>
    @section script
{
        <script type="text/javascript">
            $(function () {
                setTimeout(function () {
                    window.location.href = "/Adm/index";
                }, 3000);
            });
        </script>
    }
}
else if (ViewBag.VerityResult == "timeout")
{
    <div class="container">
        <div class="page-header">
            <h1>验证邮箱链接已失效</h1>
        </div>
        <p class="lead">
            您可以选择：
            <button onclick="verifyEmail()" >重新发送邮件</button>
        </p>
    </div>
    @section script
{
          <script type="text/javascript">
              /*
           验证邮箱
          */
              function verifyEmail() {
                  $.post("/usercenter/verifyEmail", { email: '@ViewBag.Email' }, function (data) {
                      if (data == "1") {
                          //验证成功
                          mainfn.msg("邮件已发送至邮箱，请查收验证！");
                      } else {
                          mainfn.msg("邮件发送失败！");
                      }
                  });
              }
    </script>
}
}